package com.my.bigsite.modules.sys.web;

import java.util.List;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.my.bigsite.common.util.UserUtil;
import com.my.bigsite.common.web.BaseController;
import com.my.bigsite.modules.sys.entity.Menu;
import com.my.bigsite.modules.sys.service.SystemService;

@Controller
@RequestMapping(value = "/sys/menu")
public class menuController extends BaseController {
	@Autowired SystemService  systemService;	
	
	/*@ModelAttribute("menu")
	public  Menu get(@RequestParam(required=false) String id) {
		System.out.println("导航菜单开始处理:"+id);
		return systemService.getMenu(id);
	}*/
	@RequestMapping("/tree")
	public String tree(String id, Model model,HttpSession session) {
		if("".equals(id)||id==null){
			id="62";
		}
		model.addAttribute("currentuser",UserUtil.getUserFromSession(session).getId());
		logger.info("返回菜单页面:info");
		model.addAttribute("id", id);
		return "modules/sys/index";
	}
	
	
}
